<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>用户登录</title>
    <link rel="stylesheet" href="/static/css/bootstrap.min.css">
</head>
<body>
<div class="container mt-5">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card">
                <div class="card-header">
                    <h4>用户登录</h4>
                </div>
                <div class="card-body">
                    <form action="/user/login" method="post">
                        <c:if test="${not empty error}">
                            <div class="alert alert-danger">${error}</div>
                        </c:if>
                        <div class="form-group">
                            <label for="username">用户名</label>
                            <input type="text" id="username" name="username" class="form-control" required>
                        </div>
                        <div class="form-group">
                            <label for="password">密码</label>
                            <input type="password" id="password" name="password" class="form-control" required>
                        </div>
                        <button type="submit" class="btn btn-primary btn-block">登录</button>
                    </form>
                </div>
                <div class="card-footer text-center">
                    没有账号？<a href="/user/register">立即注册</a>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="/static/js/jquery-3.6.0.min.js"></script>
<script src="/static/js/bootstrap.min.js"></script>
</body>
</html>